package com.leyou.cart.mapper;

import com.leyou.cart.pojo.Collection;
import com.leyou.item.pojo.Sku;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;


import java.util.List;

public interface CollMapper extends Mapper<Collection> {
    @Select("SELECT\n" +
            "\t*\n" +
            "FROM tb_sku AS s\n" +
            "\n" +
            "INNER JOIN \ttb_mycollection m  ON s.id = m.sku_id\n" +
            "WHERE\n" +
            "\tm.user_id = #{id}")
    List<Sku> queryColl(@Param("id") Long id);
}
